package com.learning.spring.cloud.alibaba.nacos.registraor.detail.web.config;

import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * ClassName: RibbonConfig
 * Description: Ribbon 配置属性
 * Date: 2021/8/3 19:42 【需求编号】
 *
 * @author Sam Sho
 * @version V1.0.0
 */
@Configuration
public class RibbonConfig {

    @Bean
    @LoadBalanced
    RestTemplate restTemplate(RestTemplateBuilder builder) {
        return builder.build();
    }
}
